home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xpuzzles.3 / xpuzzles / xpuzzles-5.3.1 / xskewb / Makefile.std < prev    next >
Makefile  |  1996-02-05  |  4KB  |  175 lines

  1. # X-BASED SKEWB
  2. #
  3. #    Makefile.std
  4. #
  5. ###
  6. #
  7. #  Copyright (c) 1994 - 96    David Albert Bagley, bagleyd@hertz.njit.edu
  8. #
  9. #                   All Rights Reserved
  10. #
  11. #  Permission to use, copy, modify, and distribute this software and
  12. #  its documentation for any purpose and without fee is hereby granted,
  13. #  provided that the above copyright notice appear in all copies and
  14. #  that both that copyright notice and this permission notice appear in
  15. #  supporting documentation, and that the name of the author not be
  16. #  used in advertising or publicity pertaining to distribution of the
  17. #  software without specific, written prior permission.
  18. #
  19. #  This program is distributed in the hope that it will be "playable",
  20. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  22. #
  23.  
  24. # Set your C compiler
  25. #CC        = gcc
  26. CC        = cc
  27. #CC        = acc
  28.  
  29. LINT        = lint
  30. #LINT        = alint
  31.  
  32. # Set your print command
  33. PRINT        = lpr
  34. #PRINT        = enscript -2r
  35.  
  36. # X include files
  37. XINC        = -I/usr/local/include
  38. #XINC        = -I/usr/include/X11R4
  39. #XINC        = -I/usr/include/X11R5
  40. #XINC        = -I${OPENWINHOME}/include
  41. #XINC        = -I${MOTIFHOME}/include
  42.  
  43. # X libraries
  44. XLIBPATH    = -L/usr/local/lib
  45. #XLIBPATH    = -L/usr/lib/X11R4
  46. #XLIBPATH    = -L/usr/lib/X11R5
  47. #XLIBPATH    = -L${OPENWINHOME}/lib
  48. #XLIBPATH    = -L${MOTIFHOME}/lib
  49.  
  50. # to use Motif (xm), uncomment
  51. # XM include path, below is a guess
  52. #XMINC        = -I/usr/local/include
  53. #
  54. # XM library, the path is a guess
  55. #XMLIB        = -L/usr/local/lib -lXm
  56. #XMLIB        = -lXm
  57.  
  58. wIDGET        = skewb
  59. WIDGET        = Skewb
  60. WIDGET2        = ${WIDGET}2d
  61. WIDGET3        = ${WIDGET}3d
  62.  
  63. SCOREFILE    = ./${wIDGET}.scores
  64. DATAFILE    = ./${wIDGET}.data
  65.  
  66. XPROGRAM    = x${wIDGET}
  67. XMPROGRAM    = xm${wIDGET}
  68. VER        = x${wIDGET}
  69.  
  70. COPT        = -O
  71.  
  72. DEFINES        = ${XMDEF}\
  73.      -DSCOREFILE=\"${SCOREFILE}\" -DDATAFILE=\"${DATAFILE}\"
  74.  
  75. INCLUDES    = ${XMINC} ${XINC}
  76.  
  77. CFLAGS        = ${COPT} ${DEFINES} ${INCLUDES}
  78.  
  79. LIBS        = ${XLIBPATH} ${XMLIB} -lXt -lX11
  80.  
  81. HDRS=\
  82.         ${WIDGET}.h\
  83.         ${WIDGET}P.h\
  84.         ${WIDGET2}.h\
  85.         ${WIDGET2}P.h\
  86.         ${WIDGET3}.h\
  87.         ${WIDGET3}P.h
  88. SRCS=\
  89.         rngs.c\
  90.         ${WIDGET}.c\
  91.         ${WIDGET2}.c\
  92.         ${WIDGET3}.c\
  93.         ${WIDGET}U.c
  94. OBJS=\
  95.         rngs.o\
  96.         ${WIDGET}.o\
  97.         ${WIDGET2}.o\
  98.         ${WIDGET3}.o\
  99.         ${WIDGET}U.o
  100.  
  101. #OBJS        = ${SRCS:.c=.o}
  102.  
  103.  
  104. all:    ${OBJS} ${XPROGRAM}.o
  105.     ${CC} -o ${XPROGRAM} ${OBJS} ${XPROGRAM}.o ${LIBS}
  106.  
  107. all.xm:    ${OBJS} ${XMPROGRAM}.o
  108.     ${CC} -o ${XMPROGRAM} ${OBJS} ${XMPROGRAM}.o ${LIBS}
  109.  
  110. ${WIDGET}.o:    ${WIDGET}P.h ${WIDGET2}P.h ${WIDGET3}P.h ${WIDGET}.h
  111.  
  112. ${WIDGET}U.o:    ${WIDGET}P.h ${WIDGET2}P.h ${WIDGET3}P.h ${WIDGET}.h
  113.  
  114. ${WIDGET2}.o:    ${WIDGET}P.h ${WIDGET}.h ${WIDGET2}P.h ${WIDGET2}.h
  115.  
  116. ${WIDGET3}.o:    ${WIDGET}P.h ${WIDGET}.h ${WIDGET3}P.h ${WIDGET3}.h
  117.  
  118. ${XPROGRAM}.o:    ${WIDGET}.h ${WIDGET2}.h ${WIDGET3}.h
  119.  
  120. ${XMPROGRAM}.o:    ${WIDGET}.h ${WIDGET2}.h ${WIDGET3}.h
  121.  
  122. debug:    all
  123. debug:=COPT=-g -DDEBUG -Wall
  124.  
  125. lint:
  126.     ${LINT} -ax -DLINT ${DEFINES} ${INCLUDES} ${SRCS}\
  127.     ${XPROGRAM}.c ${XMPROGRAM}.c
  128.  
  129. run:
  130.     ./${XPROGRAM}
  131.  
  132. run.xm:
  133.     ./${XMPROGRAM}
  134.  
  135. clean:
  136.     rm -f *.o ${XPROGRAM} ${XMPROGRAM} core *~ *% *.bak make.log MakeOut
  137.  
  138. clean.all:    clean
  139.     rm -f Makefile
  140.  
  141. tar:    clean.all
  142.     cd .. ; tar cvf ${VER}.tar ${VER}/${WIDGET}.h ${VER}/${WIDGET}P.h\
  143.         ${VER}/${WIDGET}.c ${VER}/${XPROGRAM}.c ${VER}/${WIDGET}U.c\
  144.         ${VER}/${WIDGET2}.h ${VER}/${WIDGET2}P.h ${VER}/${WIDGET2}.c\
  145.         ${VER}/${WIDGET3}.h ${VER}/${WIDGET3}P.h ${VER}/${WIDGET3}.c\
  146.         ${VER}/README ${VER}/${wIDGET}.xbm ${VER}/${WIDGET}.ad\
  147.         ${VER}/Imakefile ${VER}/Makefile.std ${VER}/${VER}.man\
  148.         ${VER}/${wIDGET}.scores ${VER}/make.com ${VER}/rngs.c\
  149.         ${VER}/mouse-l.xbm ${VER}/mouse-r.xbm ${VER}/${XMPROGRAM}.c
  150.  
  151. compress:    tar
  152.     cd .. ; compress -f ${VER}.tar
  153.  
  154. gzip:    tar
  155.     cd .. ; gzip -f ${VER}.tar
  156.  
  157. tgz:    tar
  158.     cd .. ; gzip -c ${VER}.tar > `echo ${VER} | cut -c1-8`.tgz ;\
  159.         rm -f ${VER}.tar
  160.  
  161. read:
  162.     more README
  163.  
  164. man:
  165.     nroff -man ${VER}.man | more
  166.  
  167. print:
  168.     ${PRINT} ${HDRS} ${SRCS}
  169.  
  170. install:    all
  171.     install ${XPROGRAM} /usr/local/bin
  172.  
  173. install.xm:    all
  174.     install ${XMPROGRAM} /usr/local/bin
  175.